﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using childApp.common;

namespace childApp
{
    public partial class LoginForm : Form
    {

        public LoginForm()
        {
            InitializeComponent();
        }

        private void Login_Load(object sender, EventArgs e)
        {

        }

        private void BtLogin_Click(object sender, EventArgs e)
        {
            if (this.TxtUser.Text.Trim() != ""
                && this.TxtPsw.Text.Trim() != "")
            {

                if (this.TxtUser.Text.Trim().ToLower() == "admin"
                    && this.TxtPsw.Text.Trim().ToLower() == "admin")
                {
                 //   DbCommon.LoginFLAG = "ADMIN";
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("请将登录信息添写完整！", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                this.TxtUser.Text = "";
                this.TxtPsw.Text = "";

                this.TxtUser.Focus();
            }
        }

        private void BtCancle_Click(object sender, EventArgs e)
        {
            this.Dispose();
            Application.Exit();
        }
    }
}
